package pe.gob.mpfn.service;

import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pe.gob.mpfn.model.Parte;


@Service
@Transactional
public class ParteServiceImpl implements ParteService {

	public long countAllPartes() {
        return Parte.countPartes();
    }

	public void deleteParte(Parte parte) {
        parte.remove();
    }

	public Parte findParte(Integer id) {
        return Parte.findParte(id);
    }

	public List<Parte> findAllPartes() {
        return Parte.findAllPartes();
    }

	public List<Parte> findParteEntries(int firstResult, int maxResults) {
        return Parte.findParteEntries(firstResult, maxResults);
    }

	public void saveParte(Parte parte) {
        parte.persist();
    }

	public Parte updateParte(Parte parte) {
        return parte.merge();
    }
}
